package com.linfeng.business.admin.service.impl;

import com.linfeng.business.admin.api.IAdminService;
import com.linfeng.business.admin.dto.data.admin.SysAdminDTO;
import com.linfeng.business.admin.dto.event.admin.cmd.AdminCreateCmd;
import com.linfeng.business.admin.dto.event.admin.cmd.AdminLoginCmd;
import com.linfeng.business.admin.dto.event.admin.cmd.AdminUpdateCmd;
import com.linfeng.business.admin.executor.admin.cmd.AdminCreateCmdExe;
import com.linfeng.business.admin.executor.admin.cmd.AdminLoginCmdExe;
import com.linfeng.business.admin.executor.admin.cmd.AdminUpdateCmdExe;
import com.linfeng.business.admin.executor.admin.qry.AdminDetailQryExe;
import com.linfeng.business.admin.executor.admin.qry.AdminPageQryExe;
import com.linfeng.component.mybatisplus.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class AdminServiceImpl extends BaseServiceImpl<SysAdminDTO, AdminPageQryExe
        ,AdminDetailQryExe, AdminCreateCmdExe, AdminUpdateCmdExe, AdminCreateCmd, AdminUpdateCmd> implements IAdminService {

//    @Autowired
//    private AdminPageQryExe adminPageQryExe;

//    @Override
//    public IPage<SysAdminDTO> page(AdminPageQry qry) {
//        return adminPageQryExe.execute(qry);
//    }

    @Autowired
    AdminLoginCmdExe adminLoginCmdExe;
    @Override
    public String login(AdminLoginCmd adminLoginCmd) {


        return adminLoginCmdExe.execute(adminLoginCmd);
    }

//    @Autowired
//    private AdminCreateCmdExe adminCreateCmdExe;
//
//    @Override
//    public boolean create(AdminCreateCmd adminCreateCmd) {
//
//        return adminCreateCmdExe.execute(adminCreateCmd);
//    }
//
//    @Autowired
//    private AdminUpdateCmdExe adminUpdateCmdExe;
//
//    @Override
//    public boolean update(AdminUpdateCmd adminUpdateCmd) {
//
//        return adminUpdateCmdExe.execute(adminUpdateCmd);
//    }
//
//    @Autowired
//    AdminDetailQryExe adminDetailQryExe;
//
//    @Override
//    public SysAdminDTO detail(Long id) {
//        return adminDetailQryExe.execute(id);
//    }
}
